<html>
<head><meta charset="utf-8"><title>How can I run tests in rust-lang/rust · clippy · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/index.html">clippy</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/How.20can.20I.20run.20tests.20in.20rust-lang.2Frust.html">How can I run tests in rust-lang/rust</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="236702660"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/How%20can%20I%20run%20tests%20in%20rust-lang/rust/near/236702660" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/How.20can.20I.20run.20tests.20in.20rust-lang.2Frust.html#236702660">(Apr 29 2021 at 16:18)</a>:</h4>
<p>How can I run clippy tests locally from a local checkout of rust-lang/rust? I'm trying to fix tests that are broken <a href="https://github.com/rust-lang/rust/pull/83213#issuecomment-828163855">in my PR</a>, and I want to make sure my fixes actually work before pushing to CI</p>



<a name="236702886"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/How%20can%20I%20run%20tests%20in%20rust-lang/rust/near/236702886" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/How.20can.20I.20run.20tests.20in.20rust-lang.2Frust.html#236702886">(Apr 29 2021 at 16:20)</a>:</h4>
<p><code>x.py test src/tools/clippy</code> errors out locally.</p>



<a name="236704712"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/How%20can%20I%20run%20tests%20in%20rust-lang/rust/near/236704712" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/How.20can.20I.20run.20tests.20in.20rust-lang.2Frust.html#236704712">(Apr 29 2021 at 16:31)</a>:</h4>
<p><span class="user-mention" data-user-id="224872">@rylev</span> <em>tests</em> should always work, what's the error?</p>



<a name="236704749"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/How%20can%20I%20run%20tests%20in%20rust-lang/rust/near/236704749" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/How.20can.20I.20run.20tests.20in.20rust-lang.2Frust.html#236704749">(Apr 29 2021 at 16:31)</a>:</h4>
<p>If you rebase over master I just today merged <code>--bless</code> support too</p>



<a name="236704830"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/How%20can%20I%20run%20tests%20in%20rust-lang/rust/near/236704830" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/How.20can.20I.20run.20tests.20in.20rust-lang.2Frust.html#236704830">(Apr 29 2021 at 16:32)</a>:</h4>
<div class="codehilite" data-code-language="Rust"><pre><span></span><code><span class="w">     </span><span class="n">Running</span><span class="w"> </span><span class="n">tests</span><span class="err">\</span><span class="n">compile</span><span class="o">-</span><span class="n">test</span><span class="p">.</span><span class="n">rs</span><span class="w"> </span><span class="p">(</span><span class="n">build</span><span class="err">\</span><span class="n">x86_64</span><span class="o">-</span><span class="n">pc</span><span class="o">-</span><span class="n">windows</span><span class="o">-</span><span class="n">msvc</span><span class="err">\</span><span class="n">stage1</span><span class="o">-</span><span class="n">tools</span><span class="err">\</span><span class="n">x86_64</span><span class="o">-</span><span class="n">pc</span><span class="o">-</span><span class="n">windows</span><span class="o">-</span><span class="n">msvc</span><span class="err">\</span><span class="n">release</span><span class="err">\</span><span class="n">deps</span><span class="err">\</span><span class="n">compile_test</span><span class="o">-</span><span class="mi">966</span><span class="n">a93c750f401a2</span><span class="p">.</span><span class="n">exe</span><span class="p">)</span><span class="w"></span>

<span class="n">running</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="n">test</span><span class="w"></span>
<span class="n">test</span><span class="w"> </span><span class="n">compile_test</span><span class="w"> </span><span class="o">..</span><span class="p">.</span><span class="w"> </span><span class="n">FAILED</span><span class="w"></span>

<span class="n">failures</span>:

<span class="o">----</span><span class="w"> </span><span class="n">compile_test</span><span class="w"> </span><span class="n">stdout</span><span class="w"> </span><span class="o">----</span><span class="w"></span>
<span class="n">thread</span><span class="w"> </span><span class="o">'</span><span class="na">compile_test</span><span class="o">'</span><span class="w"> </span><span class="n">panicked</span><span class="w"> </span><span class="n">at</span><span class="w"> </span><span class="o">'</span><span class="na">Found</span><span class="w"> </span><span class="n">multiple</span><span class="w"> </span><span class="n">rlibs</span><span class="w"> </span><span class="k">for</span><span class="w"> </span><span class="k">crate</span><span class="w"> </span><span class="err">`</span><span class="n">regex</span><span class="err">`</span>: <span class="err">`</span><span class="s">"C:</span><span class="se">\\</span><span class="s">Users</span><span class="se">\\</span><span class="s">ryanl</span><span class="se">\\</span><span class="s">Code</span><span class="se">\\</span><span class="s">rust</span><span class="se">\\</span><span class="s">build</span><span class="se">\\</span><span class="s">x86_64-pc-windows-msvc</span><span class="se">\\</span><span class="s">stage1-tools</span><span class="se">\\</span><span class="s">x86_64-pc-windows-msvc</span><span class="se">\\</span><span class="s">release</span><span class="se">\\</span><span class="s">deps</span><span class="se">\\</span><span class="s">libregex-015d389567c92b80.rlib"</span><span class="err">`</span><span class="w"> </span><span class="n">and</span><span class="w"> </span><span class="err">`</span><span class="s">"C:</span><span class="se">\\</span><span class="s">Users</span><span class="se">\\</span><span class="s">ryanl</span><span class="se">\\</span><span class="s">Code</span><span class="se">\\</span><span class="s">rust</span><span class="se">\\</span><span class="s">build</span><span class="se">\\</span><span class="s">x86_64-pc-windows-msvc</span><span class="se">\\</span><span class="s">stage1-tools</span><span class="se">\\</span><span class="s">x86_64-pc-windows-msvc</span><span class="se">\\</span><span class="s">release</span><span class="se">\\</span><span class="s">deps</span><span class="se">\\</span><span class="s">libregex-f51fec5b24dead06.rlib"</span><span class="o">'</span><span class="p">,</span><span class="w"> </span><span class="n">src</span><span class="err">\</span><span class="n">tools</span><span class="err">\</span><span class="n">clippy</span><span class="err">\</span><span class="n">tests</span><span class="err">\</span><span class="n">compile</span><span class="o">-</span><span class="n">test</span><span class="p">.</span><span class="n">rs</span>:<span class="mi">51</span>:<span class="mi">25</span><span class="w"></span>
<span class="n">note</span>: <span class="nc">run</span><span class="w"> </span><span class="n">with</span><span class="w"> </span><span class="err">`</span><span class="n">RUST_BACKTRACE</span><span class="o">=</span><span class="mi">1</span><span class="err">`</span><span class="w"> </span><span class="n">environment</span><span class="w"> </span><span class="n">variable</span><span class="w"> </span><span class="n">to</span><span class="w"> </span><span class="n">display</span><span class="w"> </span><span class="n">a</span><span class="w"> </span><span class="n">backtrace</span><span class="w"></span>


<span class="n">failures</span>:
    <span class="nc">compile_test</span><span class="w"></span>

<span class="n">test</span><span class="w"> </span><span class="n">result</span>: <span class="nc">FAILED</span><span class="p">.</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="n">passed</span><span class="p">;</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="n">failed</span><span class="p">;</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="n">ignored</span><span class="p">;</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="n">measured</span><span class="p">;</span><span class="w"> </span><span class="mi">0</span><span class="w"> </span><span class="n">filtered</span><span class="w"> </span><span class="n">out</span><span class="p">;</span><span class="w"> </span><span class="n">finished</span><span class="w"> </span><span class="k">in</span><span class="w"> </span><span class="mf">0.00</span><span class="n">s</span><span class="w"></span>

<span class="n">error</span>: <span class="nc">test</span><span class="w"> </span><span class="n">failed</span><span class="p">,</span><span class="w"> </span><span class="n">to</span><span class="w"> </span><span class="n">rerun</span><span class="w"> </span><span class="n">pass</span><span class="w"> </span><span class="o">'--</span><span class="n">test</span><span class="w"> </span><span class="n">compile</span><span class="o">-</span><span class="n">test</span><span class="o">'</span><span class="w"></span>


<span class="n">command</span><span class="w"> </span><span class="n">did</span><span class="w"> </span><span class="n">not</span><span class="w"> </span><span class="n">execute</span><span class="w"> </span><span class="n">successfully</span>: <span class="s">"</span><span class="se">\\\\</span><span class="s">?</span><span class="se">\\</span><span class="s">C:</span><span class="se">\\</span><span class="s">Users</span><span class="se">\\</span><span class="s">ryanl</span><span class="se">\\</span><span class="s">Code</span><span class="se">\\</span><span class="s">rust</span><span class="se">\\</span><span class="s">build</span><span class="se">\\</span><span class="s">x86_64-pc-windows-msvc</span><span class="se">\\</span><span class="s">stage0</span><span class="se">\\</span><span class="s">bin</span><span class="se">\\</span><span class="s">cargo.exe"</span><span class="w"> </span><span class="s">"test"</span><span class="w"> </span><span class="s">"--target"</span><span class="w"> </span><span class="s">"x86_64-pc-windows-msvc"</span><span class="w"> </span><span class="s">"-Zbinary-dep-depinfo"</span><span class="w"> </span><span class="s">"-j"</span><span class="w"> </span><span class="s">"8"</span><span class="w"> </span><span class="s">"--release"</span><span class="w"> </span><span class="s">"--manifest-path"</span><span class="w"> </span><span class="s">"C:</span><span class="se">\\</span><span class="s">Users</span><span class="se">\\</span><span class="s">ryanl</span><span class="se">\\</span><span class="s">Code</span><span class="se">\\</span><span class="s">rust</span><span class="se">\\</span><span class="s">src/tools/clippy</span><span class="se">\\</span><span class="s">Cargo.toml"</span><span class="w"> </span><span class="s">"--"</span><span class="w"></span>
<span class="n">expected</span><span class="w"> </span><span class="n">success</span><span class="p">,</span><span class="w"> </span><span class="n">got</span>: <span class="nc">exit</span><span class="w"> </span><span class="n">code</span>: <span class="mi">101</span><span class="w"></span>
</code></pre></div>



<a name="236704893"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/How%20can%20I%20run%20tests%20in%20rust-lang/rust/near/236704893" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/How.20can.20I.20run.20tests.20in.20rust-lang.2Frust.html#236704893">(Apr 29 2021 at 16:32)</a>:</h4>
<p>Oh that one - try clearing the build dir it points to</p>



<a name="236704915"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/How%20can%20I%20run%20tests%20in%20rust-lang/rust/near/236704915" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> Joshua Nelson <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/How.20can.20I.20run.20tests.20in.20rust-lang.2Frust.html#236704915">(Apr 29 2021 at 16:32)</a>:</h4>
<p>I need to fix it properly at some point</p>



<a name="236705132"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/How%20can%20I%20run%20tests%20in%20rust-lang/rust/near/236705132" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/How.20can.20I.20run.20tests.20in.20rust-lang.2Frust.html#236705132">(Apr 29 2021 at 16:34)</a>:</h4>
<p>/me tries clearing the deps folder</p>



<a name="236705540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/257328-clippy/topic/How%20can%20I%20run%20tests%20in%20rust-lang/rust/near/236705540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> rylev <a href="https://rust-lang.github.io/zulip_archive/stream/257328-clippy/topic/How.20can.20I.20run.20tests.20in.20rust-lang.2Frust.html#236705540">(Apr 29 2021 at 16:36)</a>:</h4>
<p><span class="user-mention" data-user-id="232545">@Joshua Nelson</span> that seems to have worked! Thanks!</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>